//
//  TFStateViewConfigModel.h
//  TFFoundation
//
//  Created by TFAppleWork-Summer on 2017/8/9.
//  Copyright © 2017年 TFAppleWork-Summer. All rights reserved.
//

#import <UIKit/UIKit.h>

@class TFStateView;

/**
 内容view自定义约束的Block

 @param contentView 内容view
 */
typedef void(^TFStateViewContentViewConstraintsEditBlock)(__kindof UIView * _Nonnull contentView);

/**
 contentview点击的block

 @param stateView 状态view
 @param tapGesture 点击的手势
 */
typedef void(^TFStateViewDidTapContentViewBlock)(TFStateView * _Nonnull stateView, UITapGestureRecognizer * _Nonnull tapGesture);

/**
 stateView上的按钮点击的事件

 @param stateView 状态view
 @param sender 按钮
 */
typedef void(^TFStateViewButtonActionBlock)(TFStateView * _Nonnull stateView, UIButton * _Nonnull sender);

/**
 状态view配置数据模型
 */
@interface TFStateViewConfigModel : NSObject

/**
 背景色，默认TFStyle中vcBackgroundColor
 */
@property (nonatomic, strong, nullable) UIColor *backgroudColor;

/**
 占位图片
 */
@property (nonatomic, strong, nullable) UIImage *image;

/**
 占位图片名字，支持gif
 */
@property (nonatomic, strong, nullable) NSString *imageName;

/**
 占位动态图，需设置animationDuration属性
 */
@property (nonatomic, strong, nullable) NSArray<UIImage *> *animationImages;

/**
 占位动态图，动画时长
 */
@property (nonatomic, assign) NSTimeInterval animationDuration;

/**
 标题
 */
@property (nonatomic, strong, nullable) NSString *title;

/**
 标题字体大小，默认16
 */
@property (nonatomic, strong, nullable) UIFont *titleFont;

/**
 标题字体颜色，默认TFStyle中lightGrayColor
 */
@property (nonatomic, strong, nullable) UIColor *titleColor;

/**
 标题属性字符串
 */
@property (nonatomic, strong, nullable) NSAttributedString *titleAttributedString;

/**
 详情
 */
@property (nonatomic, strong, nullable) NSString *detail;

/**
 详情字体大小，默认14
 */
@property (nonatomic, strong, nullable) UIFont *detailFont;

/**
 详情字体颜色，默认TFStyle中lightGrayColor
 */
@property (nonatomic, strong, nullable) UIColor *detailColor;

/**
 详情属性字符串
 */
@property (nonatomic, strong, nullable) NSAttributedString *detailAttributedString;

/**
 按钮标题
 */
@property (nonatomic, strong, nullable) NSString *buttonTitle;

/**
 按钮标题颜色，默认TFStyle中lightGrayColor
 */
@property (nonatomic, strong, nullable) UIColor *buttonTitleColor;

/**
 按钮标题大小，默认16
 */
@property (nonatomic, strong, nullable) UIFont *buttonTitleFont;

/**
 按钮属性字符串
 */
@property (nonatomic, strong, nullable) NSAttributedString *buttonTitleAttributedString;

/**
 按钮圆角半径
 */
@property (nonatomic, assign) CGFloat buttonCornerRadius;

/**
 按钮边框颜色
 */
@property (nonatomic, strong, nullable) UIColor *buttonBorderColor;

/**
 按钮边框宽度
 */
@property (nonatomic, assign) CGFloat buttonBorderWidth;

/**
 按钮背景色
 */
@property (nonatomic, strong, nullable) UIColor *buttonBackgroudColor;

/**
 按钮背景图片
 */
@property (nonatomic, strong, nullable) UIImage *buttonBackgroudImage;

/**
 竖直方向每个view间的间距，默认10.0
 */
@property (nonatomic, assign) CGFloat verticalSpace;

/**
 整个view上下左右边缘的间距，默认UIEdgeInsetsZero
 */
@property (nonatomic, assign) UIEdgeInsets marginInsets;

/**
 图片四周插入的距离，默认UIEdgeInsetsZero
 */
@property (nonatomic, assign) UIEdgeInsets imageMarginInsets;

/**
 标题四周插入的距离，默认UIEdgeInsetsZero
 */
@property (nonatomic, assign) UIEdgeInsets titleMarginInsets;

/**
 详情四周插入的距离，默认UIEdgeInsetsZero
 */
@property (nonatomic, assign) UIEdgeInsets detailMarginInsets;

/**
 按钮四周插入的距离，默认UIEdgeInsetsZero
 */
@property (nonatomic, assign) UIEdgeInsets buttonMarginInsets;

/**
 自定义view，需要可以确定自己的高度
 */
@property (nonatomic, strong, nullable) UIView *customView;

/**
 内容view自定义约束，注：当使用customView时，也可通过此block编辑customView的约束
 */
@property (nonatomic, copy, nullable) TFStateViewContentViewConstraintsEditBlock contentViewConstraintsEditBlock;

/**
 contentview点击的block
 */
@property (nonatomic, copy, nullable) TFStateViewDidTapContentViewBlock didTapContentViewBlock;

/**
 stateView上的按钮点击的事件
 */
@property (nonatomic, copy, nullable) TFStateViewButtonActionBlock buttonActionBlock;

@end
